package com.ebt.m.proposal_v2.base;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;

import java.util.List;

/**
 * @author archer.qi
 *         Created on 2017/5/23.
 */
public abstract class CompatRecyclerAdapter<T, V extends CompatRecyclerViewHolder> extends RecyclerView.Adapter<V> {
    public Context mContext;
    public List<T> mData;
    public LayoutInflater inflater;

    public CompatRecyclerAdapter(Context context, List<T> data) {
        mContext = context;
        mData = data;
        inflater = LayoutInflater.from(context);
    }

    @Override
    public int getItemCount() {
        return mData == null ? 0 : mData.size();
    }
}
